home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 1998 June
/
SGI Freeware 1998 June.iso
/
dist
/
fw_unzip.idb
/
usr
/
freeware
/
catman
/
u_man
/
cat1
/
unzip.Z
/
unzip
Wrap
Text File
|
1998-05-21
|
42KB
|
925 lines
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
NNNNAAAAMMMMEEEE
unzip - list, test and extract compressed files in a ZIP
archive
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
uuuunnnnzzzziiiipppp [----ZZZZ] [----ccccffffllllppppttttuuuuvvvvzzzz[aaaabbbbjjjjnnnnooooqqqqssssCCCCLLLLMMMMVVVVXXXX$$$$]] _f_i_l_e[._z_i_p]
[_f_i_l_e(_s) ...] [----xxxx _x_f_i_l_e(_s) ...] [----dddd _e_x_d_i_r]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_u_n_z_i_p will list, test, or extract files from a ZIP archive,
commonly found on MS-DOS systems. The default behavior
(with no options) is to extract into the current directory
(and subdirectories below it) all files from the specified
ZIP archive. A companion program, _z_i_p(1L), creates ZIP
archives; both programs are compatible with archives created
by PKWARE's _P_K_Z_I_P and _P_K_U_N_Z_I_P for MS-DOS, but in many cases
the program options or default behaviors differ.
AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
_f_i_l_e[._z_i_p]
Path of the ZIP archive(s). If the file specification
is a wildcard, each matching file is processed in an
order determined by the operating system (or file
system). Only the filename can be a wildcard; the path
itself cannot. Wildcard expressions are similar to
Unix _e_g_r_e_p(1) (regular) expressions and may contain:
* matches a sequence of 0 or more characters
? matches exactly 1 character
[...]
matches any single character found inside the
brackets; ranges are specified by a beginning
character, a hyphen, and an ending character. If
an exclamation point or a caret (`!' or `^')
follows the left bracket, then the range of
characters within the brackets is complemented
(that is, anything _e_x_c_e_p_t the characters inside
the brackets is considered a match).
(Be sure to quote any character that might otherwise be
interpreted or modified by the operating system,
particularly under Unix and VMS.) If no matches are
found, the specification is assumed to be a literal
filename; and if that also fails, the suffix .zip is
appended. Note that self-extracting ZIP files are
supported, as with any other ZIP archive; just specify
the .exe suffix (if any) explicitly.
[_f_i_l_e(_s)]
An optional list of archive members to be processed,
Page 1 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
separated by spaces. (VMS versions compiled with
VMSCLI defined must delimit files with commas instead.
See ----vvvv in OOOOPPPPTTTTIIIIOOOONNNNSSSS below.) Regular expressions
(wildcards) may be used to match multiple members; see
above. Again, be sure to quote expressions that would
otherwise be expanded or modified by the operating
system.
[----xxxx _x_f_i_l_e(_s)]
An optional list of archive members to be excluded from
processing. Since wildcard characters match directory
separators (`/'), this option may be used to exclude
any files that are in subdirectories. For example,
``unzip foo *.[ch] -x */*'' would extract all C source
files in the main directory, but none in any
subdirectories. Without the ----xxxx option, all C source
files in all directories within the zipfile would be
extracted.
[----dddd _e_x_d_i_r]
An optional directory to which to extract files. By
default, all files and subdirectories are recreated in
the current directory; the ----dddd option allows extraction
in an arbitrary directory (always assuming one has
permission to write to the directory). This option
need not appear at the end of the command line; it is
also accepted before the zipfile specification (with
the normal options), immediately after the zipfile
specification, or between the _f_i_l_e(_s) and the ----xxxx
option. The option and directory may be concatenated
without any white space between them, but note that
this may cause normal shell behavior to be suppressed.
In particular, ``-d ~'' (tilde) is expanded by Unix C
shells into the name of the user's home directory, but
``-d~'' is treated as a literal subdirectory ``~~~~'' of
the current directory.
OOOOPPPPTTTTIIIIOOOONNNNSSSS
Note that, in order to support obsolescent hardware, _u_n_z_i_p's
usage screen is limited to 22 or 23 lines and should
therefore be considered only a reminder of the basic _u_n_z_i_p
syntax rather than an exhaustive list of all possible flags.
The exhaustive list follows:
----ZZZZ _z_i_p_i_n_f_o(1L) mode. If the first option on the command
line is ----ZZZZ, the remaining options are taken to be
_z_i_p_i_n_f_o(1L) options. See the appropriate manual page
for a description of these options.
----AAAA [OS/2, Unix DLL] print extended help for the DLL's
programming interface (API).
Page 2 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
----cccc extract files to stdout/screen (``CRT''). This option
is similar to the ----pppp option except that the name of
each file is printed as it is extracted, the ----aaaa option
is allowed, and ASCII-EBCDIC conversion is
automatically performed if appropriate. This option is
not listed in the _u_n_z_i_p usage screen.
----ffff freshen existing files, i.e., extract only those files
that already exist on disk and that are newer than the
disk copies. By default _u_n_z_i_p queries before
overwriting, but the ----oooo option may be used to suppress
the queries. Note that under many operating systems,
the TZ (timezone) environment variable must be set
correctly in order for ----ffff and ----uuuu to work properly
(under Unix the variable is usually set automatically).
The reasons for this are somewhat subtle but have to do
with the differences between DOS-format file times
(always local time) and Unix-format times (always in
GMT/UTC) and the necessity to compare the two. A
typical TZ value is ``PST8PDT'' (US Pacific time with
automatic adjustment for Daylight Savings Time or
``summer time'').
----llll list archive files (short format). The names,
uncompressed file sizes and modification dates and
times of the specified files are printed, along with
totals for all files specified. If UnZip was compiled
with OS2_EAS defined, the ----llll option also lists columns
for the sizes of stored OS/2 extended attributes (EAs)
and OS/2 access control lists (ACLs). In addition, the
zipfile comment and individual file comments (if any)
are displayed. If a file was archived from a single-
case file system (for example, the old MS-DOS FAT file
system) and the ----LLLL option was given, the filename is
converted to lowercase and is prefixed with a caret
(^).
----pppp extract files to pipe (stdout). Nothing but the file
data is sent to stdout, and the files are always
extracted in binary format, just as they are stored (no
conversions).
----tttt test archive files. This option extracts each
specified file in memory and compares the CRC (cyclic
redundancy check, an enhanced checksum) of the expanded
file with the original file's stored CRC value.
----TTTT [most OSes] set the timestamp on the archive(s) to that
of the newest file in each one. This corresponds to
_z_i_p's ----ggggoooo option except that it can be used on wildcard
zipfiles (e.g., ``unzip -T \*.zip'') and is much
faster.
Page 3 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
----uuuu update existing files and create new ones if needed.
This option performs the same function as the ----ffff
option, extracting (with query) files that are newer
than those with the same name on disk, and in addition
it extracts those files that do not already exist on
disk. See ----ffff above for information on setting the
timezone properly.
----vvvv be verbose or print diagnostic version info. This
option has evolved and now behaves as both an option
and a modifier. As an option it has two purposes:
when a zipfile is specified with no other options, ----vvvv
lists archive files verbosely, adding to the basic ----llll
info the compression method, compressed size,
compression ratio and 32-bit CRC. When no zipfile is
specified (that is, the complete command is simply
``unzip -v''), a diagnostic screen is printed. In
addition to the normal header with release date and
version, _u_n_z_i_p lists the home Info-ZIP ftp site and
where to find a list of other ftp and non-ftp sites;
the target operating system for which it was compiled,
as well as (possibly) the hardware on which it was
compiled, the compiler and version used, and the
compilation date; any special compilation options that
might affect the program's operation (see also
DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN below); and any options stored in
environment variables that might do the same (see
EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT OOOOPPPPTTTTIIIIOOOONNNNSSSS below). As a modifier it works in
conjunction with other options (e.g., ----tttt) to produce
more verbose or debugging output; this is not yet fully
implemented but will be in future releases.
----zzzz display only the archive comment.
MMMMOOOODDDDIIIIFFFFIIIIEEEERRRRSSSS
----aaaa convert text files. Ordinarily all files are extracted
exactly as they are stored (as ``binary'' files). The
----aaaa option causes files identified by _z_i_p as text files
(those with the `t' label in _z_i_p_i_n_f_o listings, rather
than `b') to be automatically extracted as such,
converting line endings, end-of-file characters and the
character set itself as necessary. (For example, Unix
files use line feeds (LFs) for end-of-line (EOL) and
have no end-of-file (EOF) marker; Macintoshes use
carriage returns (CRs) for EOLs; and most PC operating
systems use CR+LF for EOLs and control-Z for EOF. In
addition, IBM mainframes and the Michigan Terminal
System use EBCDIC rather than the more common ASCII
character set, and NT supports Unicode.) Note that
_z_i_p's identification of text files is by no means
perfect; some ``text'' files may actually be binary and
vice versa. _u_n_z_i_p therefore prints ``[text]'' or
Page 4 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
``[binary]'' as a visual check for each file it
extracts when using the ----aaaa option. The ----aaaaaaaa option
forces all files to be extracted as text, regardless of
the supposed file type.
----bbbb [non-VMS] treat all files as binary (no text
conversions). This is a shortcut for ------------aaaa.
----bbbb [VMS] auto-convert binary files (see ----aaaa above) to
fixed-length, 512-byte record format. Doubling the
option (----bbbbbbbb) forces all files to be extracted in this
format.
----BBBB [Unix only, and only if compiled with UNIXBACKUP
defined] save a backup copy of each overwritten file
with a tilde appended (e.g., the old copy of ``foo'' is
renamed to ``foo~''). This is similar to the default
behavior of _e_m_a_c_s(1) in many locations.
----CCCC match filenames case-insensitively. _u_n_z_i_p's philosophy
is ``you get what you ask for'' (this is also
responsible for the ----LLLL/----UUUU change; see the relevant
options below). Because some file systems are fully
case-sensitive (notably those under the Unix operating
system) and because both ZIP archives and _u_n_z_i_p itself
are portable across platforms, _u_n_z_i_p's default behavior
is to match both wildcard and literal filenames case-
sensitively. That is, specifying ``makefile'' on the
command line will _o_n_l_y match ``makefile'' in the
archive, not ``Makefile'' or ``MAKEFILE'' (and
similarly for wildcard specifications). Since this
does not correspond to the behavior of many other
operating/file systems (for example, OS/2 HPFS, which
preserves mixed case but is not sensitive to it), the
----CCCC option may be used to force all filename matches to
be case-insensitive. In the example above, all three
files would then match ``makefile'' (or ``make*'', or
similar). The ----CCCC option affects files in both the
normal file list and the excluded-file list (xlist).
----jjjj junk paths. The archive's directory structure is not
recreated; all files are deposited in the extraction
directory (by default, the current one).
----LLLL convert to lowercase any filename originating on an
uppercase-only operating system or file system. (This
was _u_n_z_i_p's default behavior in releases prior to 5.11;
the new default behavior is identical to the old
behavior with the ----UUUU option, which is now obsolete and
will be removed in a future release.) Depending on the
archiver, files archived under single-case file systems
(VMS, old MS-DOS FAT, etc.) may be stored as all-
Page 5 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
uppercase names; this can be ugly or inconvenient when
extracting to a case-preserving file system such as
OS/2 HPFS or a case-sensitive one such as under Unix.
By default _u_n_z_i_p lists and extracts such filenames
exactly as they're stored (excepting truncation,
conversion of unsupported characters, etc.); this
option causes the names of all files from certain
systems to be converted to lowercase.
----MMMM pipe all output through an internal pager similar to
the Unix_m_o_r_e(1) command. At the end of a screenful of
output, _u_n_z_i_p pauses with a ``--More--'' prompt; the
next screenful may be viewed by pressing the Enter
(Return) key or the space bar. _u_n_z_i_p can be terminated
by pressing the ``q'' key and, on some systems, the
Enter/Return key. Unlike Unix _m_o_r_e(1), there is no
forward-searching or editing capability. Also, _u_n_z_i_p
doesn't notice if long lines wrap at the edge of the
screen, effectively resulting in the printing of two or
more lines and the likelihood that some text will
scroll off the top of the screen before being viewed.
On some systems the number of available lines on the
screen is not detected, in which case _u_n_z_i_p assumes the
height is 24 lines.
----nnnn never overwrite existing files. If a file already
exists, skip the extraction of that file without
prompting. By default _u_n_z_i_p queries before extracting
any file that already exists; the user may choose to
overwrite only the current file, overwrite all files,
skip extraction of the current file, skip extraction of
all existing files, or rename the current file.
----NNNN [Amiga] extract file comments as Amiga filenotes. File
comments are created with the -c option of _z_i_p(1L), or
with the -N option of the Amiga port of _z_i_p(1L), which
stores filenotes as comments.
----oooo overwrite existing files without prompting. This is a
dangerous option, so use it with care. (It is often
used with ----ffff, however, and is the only way to overwrite
directory EAs under OS/2.)
_u_n_z_i_p's default behavior may be modified via options placed
in an environment variable. This can be done with any
option, but it is probably most useful with the ----aaaa, ----LLLL, ----CCCC,
----qqqq, ----oooo, or ----nnnn modifiers: make _u_n_z_i_p auto-convert text files
by default, make it convert filenames from uppercase systems
to lowercase, make it match names case-insensitively, make
it quieter, or make it always overwrite or never overwrite
files as it extracts them. For example, to make _u_n_z_i_p act
as quietly as possible, only reporting errors, one would use
Page 6 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
one of the following commands:
UNZIP=-qq; export UNZIP Unix Bourne shell
setenv UNZIP -qq Unix C shell
set UNZIP=-qq OS/2 or MS-DOS
define UNZIP_OPTS "-qq" VMS (quotes for _l_o_w_e_r_c_a_s_e)
Environment options are, in effect, considered to be just
like any other command-line options, except that they are
effectively the first options on the command line. To
override an environment option, one may use the ``minus
operator'' to remove it. For instance, to override one of
the quiet-flags in the example above, use the command
unzip --q[_o_t_h_e_r _o_p_t_i_o_n_s] _z_i_p_f_i_l_e
The first hyphen is the normal switch character, and the
second is a minus sign, acting on the q option. Thus the
effect here is to cancel one quantum of quietness. To
cancel both quiet flags, two (or more) minuses may be used:
unzip -t--q zipfile
unzip ---qt zipfile
(the two are equivalent). This may seem awkward or
confusing, but it is reasonably intuitive: just ignore the
first hyphen and go from there. It is also consistent with
the behavior of Unix _n_i_c_e(1).
As suggested by the examples above, the default variable
names are UNZIP_OPTS for VMS (where the symbol used to
install _u_n_z_i_p as a foreign command would otherwise be
confused with the environment variable), and UNZIP for all
other operating systems. For compatibility with _z_i_p(1L),
UNZIPOPT is also accepted (don't ask). If both UNZIP and
UNZIPOPT are defined, however, UNZIP takes precedence.
_u_n_z_i_p's diagnostic option (----vvvv with no zipfile name) can be
used to check the values of all four possible _u_n_z_i_p and
_z_i_p_i_n_f_o environment variables.
The timezone variable (TZ) should be set according to the
local timezone in order for the ----ffff and ----uuuu to operate
correctly. See the description of ----ffff above for details.
This variable may also be necessary in order for timestamps
on extracted files to be set correctly. Under Windows 95/NT
_u_n_z_i_p should know the correct timezone even if TZ is unset,
assuming the timezone is correctly set in the Control Panel.
DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN
Encrypted archives are fully supported by Info-ZIP software,
but due to United States export restrictions, the encryption
and decryption sources are not packaged with the regular
Page 7 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
_u_n_z_i_p and _z_i_p distributions. Since the crypt sources were
written by Europeans, however, they are freely available at
sites throughout the world; see the file ``WHERE'' in any
Info-ZIP source or binary distribution for locations both
inside and outside the US.
Because of the separate distribution, not all compiled
versions of _u_n_z_i_p support decryption. To check a version
for crypt support, either attempt to test or extract an
encrypted archive, or else check _u_n_z_i_p's diagnostic screen
(see the ----vvvv option above) for ``[decryption]'' as one of the
special compilation options.
As noted above, the ----PPPP option may be used to supply a
password on the command line, but at a cost in security.
The preferred decryption method is simply to extract
normally; if a zipfile member is encrypted, _u_n_z_i_p will
prompt for the password without echoing what is typed.
_u_n_z_i_p continues to use the same password as long as it
appears to be valid, by testing a 12-byte header on each
file. The correct password will always check out against
the header, but there is a 1-in-256 chance that an incorrect
password will as well. (This is a security feature of the
PKWARE zipfile format; it helps prevent brute-force attacks
that might otherwise gain a large speed advantage by testing
only the header.) In the case that an incorrect password is
given but it passes the header test anyway, either an
incorrect CRC will be generated for the extracted data or
else _u_n_z_i_p will fail during the extraction because the
``decrypted'' bytes do not constitute a valid compressed
data stream.
If the first password fails the header check on some file,
_u_n_z_i_p will prompt for another password, and so on until all
files are extracted. If a password is not known, entering a
null password (that is, just a carriage return or ``Enter'')
is taken as a signal to skip all further prompting. Only
unencrypted files in the archive(s) will thereafter be
extracted. (In fact, that's not quite true; older versions
of _z_i_p(1L) and _z_i_p_c_l_o_a_k(1L) allowed null passwords, so _u_n_z_i_p
checks each encrypted file to see if the null password
works. This may result in ``false positives'' and
extraction errors, as noted above.)
Archives encrypted with 8-bit passwords (for example,
passwords with accented European characters) may not be
portable across systems and/or other archivers. This
problem stems from the use of multiple encoding methods for
such characters, including Latin-1 (ISO 8859-1) and OEM code
page 850. DOS _P_K_Z_I_P 2.04g uses the OEM code page; Windows
_P_K_Z_I_P 2.50 uses Latin-1 (and is therefore incompatible with
DOS _P_K_Z_I_P); Info-ZIP uses the OEM code page on DOS, OS/2 and
Page 8 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
Win3.x ports but Latin-1 everywhere else; and Nico Mak's
_W_i_n_Z_i_p 6.x does not allow 8-bit passwords at all. _U_n_Z_i_p 5.3
attempts to use the default character set first (e.g.,
Latin-1), followed by the alternate one (e.g., OEM code
page) to test passwords. On EBCDIC systems, if both of
these fail, EBCDIC encoding will be tested as a last resort.
(Since there are no known archivers that encrypt using
EBCDIC encoding, EBCDIC is not tested on non-EBCDIC
systems.) ISO character encodings other than Latin-1 are
not supported.
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
To use _u_n_z_i_p to extract all members of the archive
_l_e_t_t_e_r_s._z_i_p into the current directory and subdirectories
below it, creating any subdirectories as necessary:
unzip letters
To extract all members of _l_e_t_t_e_r_s._z_i_p into the current
directory only:
unzip -j letters
To test _l_e_t_t_e_r_s._z_i_p, printing only a summary message
indicating whether the archive is OK or not:
unzip -tq letters
To test _a_l_l zipfiles in the current directory, printing only
the summaries:
unzip -tq \*.zip
(The backslash before the asterisk is only required if the
shell expands wildcards, as in Unix; double quotes could
have been used instead, as in the source examples
below.) To extract to standard output all members of
_l_e_t_t_e_r_s._z_i_p whose names end in ._t_e_x, auto-converting to the
local end-of-line convention and piping the output into
_m_o_r_e(1):
unzip -ca letters \*.tex | more
To extract the binary file _p_a_p_e_r_1._d_v_i to standard output and
pipe it to a printing program:
unzip -p articles paper1.dvi | dvips
To extract all FORTRAN and C source files--*.f, *.c, *.h,
and Makefile--into the /tmp directory:
unzip source.zip "*.[fch]" Makefile -d /tmp
Page 9 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
(the double quotes are necessary only in Unix and only if
globbing is turned on). To extract all FORTRAN and C source
files, regardless of case (e.g., both *.c and *.C, and any
makefile, Makefile, MAKEFILE or similar):
unzip -C source.zip "*.[fch]" makefile -d /tmp
To extract any such files but convert any uppercase MS-DOS
or VMS names to lowercase and convert the line-endings of
all of the files to the local standard (without respect to
any files that might be marked ``binary''):
unzip -aaCL source.zip "*.[fch]" makefile -d /tmp
To extract only newer versions of the files already in the
current directory, without querying (NOTE: be careful of
unzipping in one timezone a zipfile created in another--ZIP
archives other than those created by Zip 2.1 or later
contain no timezone information, and a ``newer'' file from
an eastern timezone may, in fact, be older):
unzip -fo sources
To extract newer versions of the files already in the
current directory and to create any files not already there
(same caveat as previous example):
unzip -uo sources
To display a diagnostic screen showing which _u_n_z_i_p and
_z_i_p_i_n_f_o options are stored in environment variables, whether
decryption support was compiled in, the compiler with which
_u_n_z_i_p was compiled, etc.:
unzip -v
In the last five examples, assume that UNZIP or UNZIP_OPTS
is set to -q. To do a singly quiet listing:
unzip -l file.zip
To do a doubly quiet listing:
unzip -ql file.zip
(Note that the ``.zip'' is generally not necessary.) To do
a standard listing:
unzip --ql file.zip
or
unzip -l-q file.zip
or
Page 10 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
unzip -l--q file.zip (extra minuses don't hurt)
TTTTIIIIPPPPSSSS
The current maintainer, being a lazy sort, finds it very
useful to define a pair of aliases: tt for ``unzip -tq''
and ii for ``unzip -Z'' (or ``zipinfo''). One may then
simply type ``tt zipfile'' to test an archive, something
that is worth making a habit of doing. With luck _u_n_z_i_p will
report ``No errors detected in compressed data of
zipfile.zip,'' after which one may breathe a sigh of relief.
The maintainer also finds it useful to set the UNZIP
environment variable to ``-aL'' and is tempted to add ``-C''
as well. His ZIPINFO variable is set to ``-z''.
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
The exit status (or error level) approximates the exit codes
defined by PKWARE and takes on the following values, except
under VMS:
0 normal; no errors or warnings detected.
1 one or more warning errors were encountered, but
processing completed successfully anyway. This
includes zipfiles where one or more files was
skipped due to unsupported compression method or
encryption with an unknown password.
2 a generic error in the zipfile format was
detected. Processing may have completed
successfully anyway; some broken zipfiles created
by other archivers have simple work-arounds.
3 a severe error in the zipfile format was detected.
Processing probably failed immediately.
4 _u_n_z_i_p was unable to allocate memory for one or
more buffers during program initialization.
5 _u_n_z_i_p was unable to allocate memory or unable to
obtain a tty to read the decryption password(s).
6 _u_n_z_i_p was unable to allocate memory during
decompression to disk.
7 _u_n_z_i_p was unable to allocate memory during in-
memory decompression.
8 [currently not used]
9 the specified zipfiles were not found.
Page 11 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
10 invalid options were specified on the command
line.
11 no matching files were found.
50 the disk is (or was) full during extraction.
51 the end of the ZIP archive was encountered
prematurely.
80 the user aborted _u_n_z_i_p prematurely with control-C
(or similar)
81 testing or extraction of one or more files failed
due to unsupported compression methods or
unsupported decryption.
82 no files were found due to bad decryption
password(s). (If even one file is successfully
processed, however, the exit status is 1.)
VMS interprets standard Unix (or PC) return values as other,
scarier-looking things, so _u_n_z_i_p instead maps them into
VMS-style status codes. The current mapping is as follows:
1 (success) for normal exit, 0x7fff0001 for warning errors,
and (0x7fff000? + 16*normal_unzip_exit_status) for all other
errors, where the `?' is 2 (error) for _u_n_z_i_p values 2, 9-11
and 80-82, and 4 (fatal error) for the remaining ones (3-8,
50, 51). In addition, there is a compilation option to
expand upon this behavior: defining RETURN_CODES results in
a human-readable explanation of what the error status means.
BBBBUUUUGGGGSSSS
Multi-part archives are not yet supported, except in
conjunction with _z_i_p. (All parts must be concatenated
together in order, and then ``zip -F'' must be performed on
the concatenated archive in order to ``fix'' it.) This will
definitely be corrected in the next major release.
Archives read from standard input are not yet supported,
except with _f_u_n_z_i_p (and then only the first member of the
archive can be extracted).
Archives encrypted with 8-bit passwords (e.g., passwords
with accented European characters) may not be portable
across systems and/or other archivers. See the discussion
in DDDDEEEECCCCRRRRYYYYPPPPTTTTIIIIOOOONNNN above.
_u_n_z_i_p's ----MMMM (``more'') option is overly simplistic in its
handling of screen output; as noted above, it fails to
detect the wrapping of long lines and may thereby cause
lines at the top of the screen to be scrolled off before
Page 12 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
being read. _u_n_z_i_p should detect and treat each occurrence
of line-wrap as one additional line printed. This requires
knowledge of the screen's width as well as its height. In
addition, _u_n_z_i_p should detect the true screen geometry on
all systems.
Dates, times and permissions of stored directories are not
restored except under Unix.
[MS-DOS] When extracting or testing files from an archive on
a defective floppy diskette, if the ``Fail'' option is
chosen from DOS's ``Abort, Retry, Fail?'' message, older
versions of _u_n_z_i_p may hang the system, requiring a reboot.
This problem appears to be fixed, but control-C (or
control-Break) can still be used to terminate _u_n_z_i_p.
Under DEC Ultrix, _u_n_z_i_p would sometimes fail on long
zipfiles (bad CRC, not always reproducible). This was
apparently due either to a hardware bug (cache memory) or an
operating system bug (improper handling of page faults?).
Since Ultrix has been abandoned in favor of Digital Unix
(OSF/1), this may not be an issue anymore.
[Unix] Unix special files such as FIFO buffers (named
pipes), block devices and character devices are not restored
even if they are somehow represented in the zipfile, nor are
hard-linked files relinked. Basically the only file types
restored by _u_n_z_i_p are regular files, directories and
symbolic (soft) links.
[OS/2] Extended attributes for existing directories are only
updated if the ----oooo (``overwrite all'') option is given. This
is a limitation of the operating system; because directories
only have a creation time associated with them, _u_n_z_i_p has no
way to determine whether the stored attributes are newer or
older than those on disk. In practice this may mean a two-
pass approach is required: first unpack the archive
normally (with or without freshening/updating existing
files), then overwrite just the directory entries (e.g.,
``unzip -o foo */'').
[VMS] When extracting to another directory, only the [._f_o_o]
syntax is accepted for the ----dddd option; the simple Unix _f_o_o
syntax is silently ignored (as is the less common VMS
_f_o_o._d_i_r syntax).
[VMS] When the file being extracted already exists, _u_n_z_i_p's
query only allows skipping, overwriting or renaming; there
should additionally be a choice for creating a new version
of the file. In fact, the ``overwrite'' choice does create
a new version; the old version is not overwritten or
deleted.
Page 13 (printed 5/6/98)
UUUUNNNNZZZZIIIIPPPP((((1111LLLL)))) IIIInnnnffffoooo----ZZZZIIIIPPPP ((((3333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999997777 ((((vvvv5555....33332222)))))))) UUUUNNNNZZZZIIIIPPPP((((1111LLLL))))
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_f_u_n_z_i_p(1L), _z_i_p(1L), _z_i_p_c_l_o_a_k(1L), _z_i_p_g_r_e_p(1L), _z_i_p_i_n_f_o(1L),
_z_i_p_n_o_t_e(1L), _z_i_p_s_p_l_i_t(1L)
UUUURRRRLLLL
The Info-ZIP home page is currently at
http://www.cdrom.com/pub/infozip/ .
AAAAUUUUTTTTHHHHOOOORRRRSSSS
The primary Info-ZIP authors (current semi-active members of
the Zip-Bugs workgroup) are: Greg ``Cave Newt'' Roelofs
(UnZip); Onno van der Linden (Zip); Jean-loup Gailly
(compression); Mark Adler (decompression, fUnZip); Christian
Spieler (VMS, MS-DOS, Windows 95, NT, shared code, general
Zip and UnZip integration and optimization); Mike White
(Windows GUI, Windows DLLs); Kai Uwe Rommel (OS/2); Paul
Kienitz (Amiga, Windows 95); Chris Herborth (BeOS, QNX,
Atari); Jonathan Hudson (SMS/QDOS); Sergio Monesi (Acorn
RISC OS); Harald Denker (Atari, MVS); John Bush (Solaris,
Amiga); Hunter Goatley (VMS); Steve Salisbury (Windows 95,
NT); Steve Miller (Windows CE GUI), Johnny Lee (MS-DOS,
Windows 95, NT); and Dave Smith (Tandem NSK). The author of
the original unzip code upon which Info-ZIP's was based is
Samuel H. Smith; Carl Mascott did the first Unix port; and
David P. Kirschbaum organized and led Info-ZIP in its early
days with Keith Petersen hosting the original mailing list
at WSMR-SimTel20. The full list of contributors to UnZip
has grown quite large; please refer to the CONTRIBS file in
the UnZip source distribution for a relatively complete
version.
VVVVEEEERRRRSSSSIIIIOOOONNNNSSSS
v1.2 15 Mar 89 Samuel H. Smith
v2.0 9 Sep 89 Samuel H. Smith
v2.x fall 1989 many Usenet contributors
v3.0 1 May 90 Info-ZIP (DPK, consolidator)
v3.1 15 Aug 90 Info-ZIP (DPK, consolidator)
v4.0 1 Dec 90 Info-ZIP (GRR, maintainer)
v4.1 12 May 91 Info-ZIP
v4.2 20 Mar 92 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.0 21 Aug 92 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.01 15 Jan 93 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.1 7 Feb 94 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.11 2 Aug 94 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.12 28 Aug 94 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.2 30 Apr 96 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.3 22 Apr 97 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.31 31 May 97 Info-ZIP (Zip-Bugs subgroup, GRR)
v5.32 3 Nov 97 Info-ZIP (Zip-Bugs subgroup, GRR)
Page 14 (printed 5/6/98)